/**
 * 
 */
package dms.repository;

import java.util.Date;
import java.util.List;

import dms.model.Building;
import dms.model.Dormitory;
import dms.model.School;
import dms.model.form.DormitoryChange;
import dms.model.form.Repair;
import dms.model.role.Student;
import dms.model.util.PageIterator;

/**
 * @author 李健
 *
 */
public interface DormitoryChangeRepository {

	DormitoryChange findById(Long id);
	
	PageIterator<DormitoryChange> findByStudent(int start, int count, Student student, Date from, Date to);
	
	PageIterator<DormitoryChange> findBySchool(int start, int count, School school, Date from, Date to);
	
	PageIterator<DormitoryChange> findByProcessed(int start, int count, Date fromDate, Date toDate, School school);
	
	PageIterator<DormitoryChange> findByApplied(int start, int count, Date fromDate, Date toDate, School school);
	
	PageIterator<DormitoryChange> findBySchool(int start, int count, Date fromDate, Date toDate,School school, Boolean processed, Boolean applied);
	
	DormitoryChange createDormitoryChange(DormitoryChange dormitoryChangeInfo) throws Exception;
	
	DormitoryChange updateDormitoryChange(DormitoryChange dormitoryChangeInfo) throws Exception;
	
	void deleteDormitoryChangeById(Long id) throws Exception;
	
	void deleteDormitoryChanges(List<Long> ids) throws Exception;
}
